/**
* javaScript
*
* Gonglong 2013.07.24
**/

/** from 163.com --start **/

function setJqgridData_json() {
	console.info("setJqgrid");
	jQuery("#jqgrid_json").jqGrid({
		datatype: "json",
		method : 'POST',
		url:"test.do?reqCode=listwtrjson",
		height: "auto",
		postData:{loginuserid:parent.userid},//developer用户ID
		width : 750,
	   	colNames:['ID','序列号','caseName' ,'文件大小(G)','优先级','文件个数','工作类型','难易度'],
	   	colModel:[
	   		{name:'id',index:'id', width:60, sorttype:"int",width:80,hidden:true},
	   		{name:'id',index:'id', width:60, sorttype:"int",width:80},
	   		{name:'casename',index:'casename', width:60, sorttype:"int",width:120},
	   		{name:'filesize',index:'filesize', width:60, sorttype:"int",width:80},
			{name:'priority',index:'priority', width:100,edittype:'select',formatter:'select', editoptions:{value:"1:优先;2:中;3:一般"}},
			{name:'filenum',index:'filenum', width:100},
			{name:'worktype',index:'worktype', width:100,edittype:'select',formatter:'select', editoptions:{value:"1:nuix;2:LAW;3:DEL;4:Rel"}},
			{name:'degree',index:'degree', width:100,edittype:'select',formatter:'select', editoptions:{value:"1:易;2:中;3:难"}}
	   	],
	   	jsonReader:{
	   		root : "dataroot",
	   		records: "totalrecords",
	   		page: "currpage",
	   		total: "totalpages",
	   		repeatitems : false
	   		},
	   	viewrecords : true,
	   	multiselect: false,
		pager: '#pager2',
		rowNum:100,
	   	rowList:[10,20,30],
		sortname: 'no',
	   	caption: "任务列表"
	}).navGrid("#pager2",{edit:false,add:false,del:false});
}